package com.yelobblog.yelobblog.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yelobblog.yelobblog.domain.Dto.commentsDto;
import com.yelobblog.yelobblog.domain.Vo.commentsVo;
import com.yelobblog.yelobblog.domain.entity.comments;
import org.springframework.transaction.annotation.Transactional;

public interface commentService extends IService<comments> {
    void addComment(commentsDto commentsDto);

    void deleteComment(Integer id);

    Page<commentsVo> getCommentsByArticleId(Integer pageNum, Integer pageSize, Integer articleId);

    Page<commentsVo> getCommentsByrootCommentsId(Integer pageNum, Integer pageSize, Integer rootCommentsId);

    @Transactional
    void likeComment(Integer id);

    @Transactional
    void dislikeComment(Integer id);

    Boolean getCommentLike(Integer commentId);
}
